package string;
/**
 * String substring(int start,int end)
 * 截取当前字符串中指定范围的字符串(含头不含尾)
 * */
public class SubstringDemo {
    public static void main(String[] args) {
        String str = "www.tedu.cn";
        String sub = str.substring(4,8);
        System.out.println(sub);

        String sub1 = str.substring(4);
        System.out.println(sub1);

    }
}
